Learn R Programming

GISTools (version 0.7-4)

Polygon Label Points: Number of Points in Each Polygon

Description

Given a set of polygons, returns the label point for each polygon in a SpatialPoints object.

Usage

poly.labels(polys)

Arguments

polys
A SpatialPolygons or SpatialPolygonsDataFrame object.

Value

SpatialPoints object containing the label point for each polygon.

Examples

Run this code
# Data for New Haven to use in example
data(newhaven)
# How many breaches of peace in each census block?
n.breach = poly.counts(breach,blocks)
# Compute densities and map them
choropleth(blocks,n.breach/blocks$AREA)

Run the code above in your browser using DataLab